Optimal. Leaf size=116 \[ \frac {\sqrt {c} \tanh ^{-1}\left (\frac {\sqrt {c} x}{\sqrt {a+c x^2}}\right )}{e}+\frac {\sqrt {c d^2+a e^2} \tanh ^{-1}\left (\frac {a e-c d x}{\sqrt {c d^2+a e^2} \sqrt {a+c x^2}}\right )}{d e}-\frac {\sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a+c x^2}}{\sqrt {a}}\right )}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.06, antiderivative size = 116, normalized size of antiderivative = 1.00, number of steps
used = 9, number of rules used = 8, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.364, Rules used = {910, 272, 65,
214, 858, 223, 212, 739} \begin {gather*} \frac {\sqrt {a e^2+c d^2} \tanh ^{-1}\left (\frac {a e-c d x}{\sqrt {a+c x^2} \sqrt {a e^2+c d^2}}\right )}{d e}-\frac {\sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a+c x^2}}{\sqrt {a}}\right )}{d}+\frac {\sqrt {c} \tanh ^{-1}\left (\frac {\sqrt {c} x}{\sqrt {a+c x^2}}\right )}{e} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 65
Rule 212
Rule 214
Rule 223
Rule 272
Rule 739
Rule 858
Rule 910
Rubi steps
\begin {align*} \int \frac {\sqrt {a+c x^2}}{x (d+e x)} \, dx &=-\frac {\int \frac {a e-c d x}{(d+e x) \sqrt {a+c x^2}} \, dx}{d}+\frac {a \int \frac {1}{x \sqrt {a+c x^2}} \, dx}{d}\\ &=\frac {a \text {Subst}\left (\int \frac {1}{x \sqrt {a+c x}} \, dx,x,x^2\right )}{2 d}+\frac {c \int \frac {1}{\sqrt {a+c x^2}} \, dx}{e}-\left (\frac {c d}{e}+\frac {a e}{d}\right ) \int \frac {1}{(d+e x) \sqrt {a+c x^2}} \, dx\\ &=\frac {a \text {Subst}\left (\int \frac {1}{-\frac {a}{c}+\frac {x^2}{c}} \, dx,x,\sqrt {a+c x^2}\right )}{c d}+\frac {c \text {Subst}\left (\int \frac {1}{1-c x^2} \, dx,x,\frac {x}{\sqrt {a+c x^2}}\right )}{e}-\left (-\frac {c d}{e}-\frac {a e}{d}\right ) \text {Subst}\left (\int \frac {1}{c d^2+a e^2-x^2} \, dx,x,\frac {a e-c d x}{\sqrt {a+c x^2}}\right )\\ &=\frac {\sqrt {c} \tanh ^{-1}\left (\frac {\sqrt {c} x}{\sqrt {a+c x^2}}\right )}{e}+\frac {\sqrt {c d^2+a e^2} \tanh ^{-1}\left (\frac {a e-c d x}{\sqrt {c d^2+a e^2} \sqrt {a+c x^2}}\right )}{d e}-\frac {\sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a+c x^2}}{\sqrt {a}}\right )}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.23, size = 137, normalized size = 1.18 \begin {gather*} -\frac {2 \sqrt {-c d^2-a e^2} \tan ^{-1}\left (\frac {\sqrt {c} (d+e x)-e \sqrt {a+c x^2}}{\sqrt {-c d^2-a e^2}}\right )-2 \sqrt {a} e \tanh ^{-1}\left (\frac {\sqrt {c} x-\sqrt {a+c x^2}}{\sqrt {a}}\right )+\sqrt {c} d \log \left (-\sqrt {c} x+\sqrt {a+c x^2}\right )}{d e} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(304\) vs.
\(2(98)=196\).
time = 0.08, size = 305, normalized size = 2.63
method | result | size |
default | \(-\frac {\sqrt {c \left (x +\frac {d}{e}\right )^{2}-\frac {2 c d \left (x +\frac {d}{e}\right )}{e}+\frac {a \,e^{2}+c \,d^{2}}{e^{2}}}-\frac {\sqrt {c}\, d \ln \left (\frac {-\frac {c d}{e}+c \left (x +\frac {d}{e}\right )}{\sqrt {c}}+\sqrt {c \left (x +\frac {d}{e}\right )^{2}-\frac {2 c d \left (x +\frac {d}{e}\right )}{e}+\frac {a \,e^{2}+c \,d^{2}}{e^{2}}}\right )}{e}-\frac {\left (a \,e^{2}+c \,d^{2}\right ) \ln \left (\frac {\frac {2 a \,e^{2}+2 c \,d^{2}}{e^{2}}-\frac {2 c d \left (x +\frac {d}{e}\right )}{e}+2 \sqrt {\frac {a \,e^{2}+c \,d^{2}}{e^{2}}}\, \sqrt {c \left (x +\frac {d}{e}\right )^{2}-\frac {2 c d \left (x +\frac {d}{e}\right )}{e}+\frac {a \,e^{2}+c \,d^{2}}{e^{2}}}}{x +\frac {d}{e}}\right )}{e^{2} \sqrt {\frac {a \,e^{2}+c \,d^{2}}{e^{2}}}}}{d}+\frac {\sqrt {c \,x^{2}+a}-\sqrt {a}\, \ln \left (\frac {2 a +2 \sqrt {a}\, \sqrt {c \,x^{2}+a}}{x}\right )}{d}\) | \(305\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.30, size = 103, normalized size = 0.89 \begin {gather*} \frac {{\left (\sqrt {c} d \operatorname {arsinh}\left (\frac {c x}{\sqrt {a c}}\right ) e^{\left (-2\right )} - \sqrt {c d^{2} e^{\left (-2\right )} + a} \operatorname {arsinh}\left (\frac {2 \, c d x}{\sqrt {a c} {\left | 2 \, x e + 2 \, d \right |}} - \frac {2 \, a e}{\sqrt {a c} {\left | 2 \, x e + 2 \, d \right |}}\right ) e^{\left (-1\right )} - \sqrt {a} \operatorname {arsinh}\left (\frac {a}{\sqrt {a c} {\left | x \right |}}\right ) e^{\left (-1\right )}\right )} e}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 3.51, size = 1299, normalized size = 11.20 \begin {gather*} \left [\frac {{\left (\sqrt {c} d \log \left (-2 \, c x^{2} - 2 \, \sqrt {c x^{2} + a} \sqrt {c} x - a\right ) + \sqrt {a} e \log \left (-\frac {c x^{2} - 2 \, \sqrt {c x^{2} + a} \sqrt {a} + 2 \, a}{x^{2}}\right ) + \sqrt {c d^{2} + a e^{2}} \log \left (-\frac {2 \, c^{2} d^{2} x^{2} - 2 \, a c d x e + a c d^{2} - 2 \, \sqrt {c d^{2} + a e^{2}} {\left (c d x - a e\right )} \sqrt {c x^{2} + a} + {\left (a c x^{2} + 2 \, a^{2}\right )} e^{2}}{x^{2} e^{2} + 2 \, d x e + d^{2}}\right )\right )} e^{\left (-1\right )}}{2 \, d}, -\frac {{\left (2 \, \sqrt {-c} d \arctan \left (\frac {\sqrt {-c} x}{\sqrt {c x^{2} + a}}\right ) - \sqrt {a} e \log \left (-\frac {c x^{2} - 2 \, \sqrt {c x^{2} + a} \sqrt {a} + 2 \, a}{x^{2}}\right ) - \sqrt {c d^{2} + a e^{2}} \log \left (-\frac {2 \, c^{2} d^{2} x^{2} - 2 \, a c d x e + a c d^{2} - 2 \, \sqrt {c d^{2} + a e^{2}} {\left (c d x - a e\right )} \sqrt {c x^{2} + a} + {\left (a c x^{2} + 2 \, a^{2}\right )} e^{2}}{x^{2} e^{2} + 2 \, d x e + d^{2}}\right )\right )} e^{\left (-1\right )}}{2 \, d}, \frac {{\left (\sqrt {c} d \log \left (-2 \, c x^{2} - 2 \, \sqrt {c x^{2} + a} \sqrt {c} x - a\right ) + \sqrt {a} e \log \left (-\frac {c x^{2} - 2 \, \sqrt {c x^{2} + a} \sqrt {a} + 2 \, a}{x^{2}}\right ) - 2 \, \sqrt {-c d^{2} - a e^{2}} \arctan \left (-\frac {\sqrt {-c d^{2} - a e^{2}} {\left (c d x - a e\right )} \sqrt {c x^{2} + a}}{c^{2} d^{2} x^{2} + a c d^{2} + {\left (a c x^{2} + a^{2}\right )} e^{2}}\right )\right )} e^{\left (-1\right )}}{2 \, d}, -\frac {{\left (2 \, \sqrt {-c} d \arctan \left (\frac {\sqrt {-c} x}{\sqrt {c x^{2} + a}}\right ) - \sqrt {a} e \log \left (-\frac {c x^{2} - 2 \, \sqrt {c x^{2} + a} \sqrt {a} + 2 \, a}{x^{2}}\right ) + 2 \, \sqrt {-c d^{2} - a e^{2}} \arctan \left (-\frac {\sqrt {-c d^{2} - a e^{2}} {\left (c d x - a e\right )} \sqrt {c x^{2} + a}}{c^{2} d^{2} x^{2} + a c d^{2} + {\left (a c x^{2} + a^{2}\right )} e^{2}}\right )\right )} e^{\left (-1\right )}}{2 \, d}, \frac {{\left (2 \, \sqrt {-a} \arctan \left (\frac {\sqrt {-a}}{\sqrt {c x^{2} + a}}\right ) e + \sqrt {c} d \log \left (-2 \, c x^{2} - 2 \, \sqrt {c x^{2} + a} \sqrt {c} x - a\right ) + \sqrt {c d^{2} + a e^{2}} \log \left (-\frac {2 \, c^{2} d^{2} x^{2} - 2 \, a c d x e + a c d^{2} - 2 \, \sqrt {c d^{2} + a e^{2}} {\left (c d x - a e\right )} \sqrt {c x^{2} + a} + {\left (a c x^{2} + 2 \, a^{2}\right )} e^{2}}{x^{2} e^{2} + 2 \, d x e + d^{2}}\right )\right )} e^{\left (-1\right )}}{2 \, d}, -\frac {{\left (2 \, \sqrt {-c} d \arctan \left (\frac {\sqrt {-c} x}{\sqrt {c x^{2} + a}}\right ) - 2 \, \sqrt {-a} \arctan \left (\frac {\sqrt {-a}}{\sqrt {c x^{2} + a}}\right ) e - \sqrt {c d^{2} + a e^{2}} \log \left (-\frac {2 \, c^{2} d^{2} x^{2} - 2 \, a c d x e + a c d^{2} - 2 \, \sqrt {c d^{2} + a e^{2}} {\left (c d x - a e\right )} \sqrt {c x^{2} + a} + {\left (a c x^{2} + 2 \, a^{2}\right )} e^{2}}{x^{2} e^{2} + 2 \, d x e + d^{2}}\right )\right )} e^{\left (-1\right )}}{2 \, d}, \frac {{\left (2 \, \sqrt {-a} \arctan \left (\frac {\sqrt {-a}}{\sqrt {c x^{2} + a}}\right ) e + \sqrt {c} d \log \left (-2 \, c x^{2} - 2 \, \sqrt {c x^{2} + a} \sqrt {c} x - a\right ) - 2 \, \sqrt {-c d^{2} - a e^{2}} \arctan \left (-\frac {\sqrt {-c d^{2} - a e^{2}} {\left (c d x - a e\right )} \sqrt {c x^{2} + a}}{c^{2} d^{2} x^{2} + a c d^{2} + {\left (a c x^{2} + a^{2}\right )} e^{2}}\right )\right )} e^{\left (-1\right )}}{2 \, d}, -\frac {{\left (\sqrt {-c} d \arctan \left (\frac {\sqrt {-c} x}{\sqrt {c x^{2} + a}}\right ) - \sqrt {-a} \arctan \left (\frac {\sqrt {-a}}{\sqrt {c x^{2} + a}}\right ) e + \sqrt {-c d^{2} - a e^{2}} \arctan \left (-\frac {\sqrt {-c d^{2} - a e^{2}} {\left (c d x - a e\right )} \sqrt {c x^{2} + a}}{c^{2} d^{2} x^{2} + a c d^{2} + {\left (a c x^{2} + a^{2}\right )} e^{2}}\right )\right )} e^{\left (-1\right )}}{d}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sqrt {a + c x^{2}}}{x \left (d + e x\right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {\sqrt {c\,x^2+a}}{x\,\left (d+e\,x\right )} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________